const getters = {
  avatar: (state) => state.user.avatar,
  userName: (state) => state.user.userName,
  userId: (state) => state.user.userId,
  userType: (state) => state.user.userType, //用户权限等级
  userDept: (state) => state.user.userDept, // 用户部门
  userTypeName: (state) => {
    let userTypeName;
    switch(state.user.userType){
      case 0 : userTypeName='游客';break;
      case 1 : userTypeName='员工';break;
      case 2 : userTypeName='负责人';break;
      case 3 : userTypeName='管理者';break;
      default: userTypeName='弃用';break;
    }
    return userTypeName;
  }
};
export default getters;
